package com.hongyu.smart.village.network.api;


import com.hongyu.smart.village.model.Family;
import com.hongyu.smart.village.model.entity.BaseResponse;
import com.hongyu.smart.village.model.response.DomicileResp;
import com.hongyu.smart.village.model.response.MemberResp;
import com.hongyu.smart.village.model.response.UserLoginResp;
import com.hongyu.smart.village.network.UrlDefine;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface AppInfoApi {

    @POST(UrlDefine.LOGIN)
    Observable<BaseResponse<UserLoginResp>> submit(@Query("loginName") String username, @Query("password") String userPass);

    @POST(UrlDefine.LOGIN)
    Observable<BaseResponse<UserLoginResp>> userLogin(@Query("username") String username, @Query("password") String password);

//    @POST(UrlDefine.HTML_LIST)
//    Observable<BaseResponse<List<Html>>> htmlList(@Query("typeName")String tyName,@Query("query")String query,@Query("username") String username, @Query("userPass") String userPass, @Query("userType") int userType);
//
//    @POST(UrlDefine.VEDIO_WEBSITE_LIST)
//    Observable<BaseResponse<List<Vedio>>> vedioWebSiteList();
//
    @POST(UrlDefine.MEMBER_LIST)
    Observable<BaseResponse<List<MemberResp>>> memberList(@Query("houseNumber") String houseNumber);
    @POST(UrlDefine.PARENT_REGION_CODE)
    Observable<BaseResponse<String>> regionParentCode(@Query("regionId")String regionId);

    @POST(UrlDefine.DOMICLE_SAVE)
    Observable<BaseResponse<Object>> domicileSave(@Query("id")int id, @Query("userId")int userId, @Query("qty")int qty, @Query("qty2")int qty2, @Query("code")String code);

    @POST(UrlDefine.DOMICLE_FIND)
    Observable<BaseResponse<DomicileResp>> domicileFind(@Query("userId")int userId);
    @POST(UrlDefine.MEMBER_SAVE)
    Observable<BaseResponse<Object>>  memberAdd(@Query("id")int id, @Query("name")String name, @Query("ids")String ids, @Query("nation")String nation,@Query("number")String number, @Query("address")String address, @Query("ageStr")String ageStr, @Query("education")String education, @Query("political")String political, @Query("marriage")String marriage, @Query("addre")String addre);
    @POST(UrlDefine.FAMILY_FIND)
    Observable<BaseResponse<Family>> familyFind(@Query("id")int id);
//    @POST(UrlDefine.VEDIO_LIST)
//    Observable<BaseResponse<List<Vedio>>> vedioList(@Query("query")String query,@Query("webSite")String webSite,@Query("typeName")String tyName,@Query("pageNum") int pageNum, @Query("pageSize")int pageSize);
//    @POST(UrlDefine.PICTURE_LIST)
//    Observable<BaseResponse<List<Picture>>> pictureList(@Query("typeName")String tyName,@Query("query")String query,@Query("pageNum") int pageNum, @Query("pageSize")int pageSize);
//
//    @POST(UrlDefine.TXT_LIST)
//    Observable<BaseResponse<List<Txt>>>txtList(@Query("typeName")String tyName,@Query("query")String query,@Query("pageNum") int pageNum, @Query("pageSize")int pageSize);
//    @POST(UrlDefine.TXT_FIND)
//    Observable<BaseResponse<Txt>>fiondTxt(@Query("id") int id);
}
